package com.atguigu.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @Author 懵懂的青春
 * @Date 2020/7/31 19:19
 * @Version 1.0
 * @Description
 **/
@RestController
@Slf4j
public class OrderController {
    @Resource
    private RestTemplate restTemplate;

    private static final String INVOKE_URL="http://cloud-payment-service";

    @GetMapping("/consumer/payment/zk")
    public String getOrderZk(){
        return restTemplate.getForObject(INVOKE_URL+"/payment/zk",String.class);
    }
}
